<include file="public:head" />
<include file="public:sep" />
<style type="text/css">
  .layui-nav-tree{width: 200px!important;}
</style>
<div class="layui-container fly-marginTop fly-user-main">
  <include file="ucleft" />

  <div class="site-tree-mobile layui-hide">
    <i class="layui-icon">&#xe602;</i>
  </div>
  <div class="site-mobile-shade"></div>
  
  <div class="site-tree-mobile layui-hide">
    <i class="layui-icon">&#xe602;</i>
  </div>
  <div class="site-mobile-shade"></div>
  
  
  <div class="fly-panel fly-panel-user" pad20>
    <div class="layui-tab layui-tab-brief" lay-filter="user">
      <ul class="layui-tab-title" id="LAY_mine">
        <li><a href="{:U('ucenter/index')}">我的资料</a></li>
        <li><a href="{:U('ucenter/setavatar')}" >头像设置</a></li>
        <li class="layui-this"><a href="{:U('ucenter/setpassword')}">修改密码</a></li>
      </ul>
      <div class="layui-tab-content" style="padding: 20px 0;">
         <form class="layui-form layui-form-pane" action="">
           <div class="layui-form-item"> 
            <label for="L_nowpass" class="layui-form-label">当前密码</label> 
            <div class="layui-input-inline"> 
             <input type="password"  name="oldpassword" required="" lay-verify="required" class="layui-input" /> 
            </div> 
           </div> 
           <div class="layui-form-item"> 
            <label for="L_pass" class="layui-form-label">新密码</label> 
            <div class="layui-input-inline"> 
             <input type="password" name="password" required="" lay-verify="required" class="layui-input" /> 
            </div> 
            <div class="layui-form-mid layui-word-aux">
             6到16个字符
            </div> 
           </div> 
           <div class="layui-form-item"> 
            <label for="L_repass" class="layui-form-label">确认密码</label> 
            <div class="layui-input-inline"> 
             <input type="password" name="repassword" required="" lay-verify="required" class="layui-input" /> 
            </div> 
           </div> 
           <div class="layui-form-item"> 
            <button class="layui-btn" key="set-mine" lay-filter="upbtn" lay-submit="">确认修改</button> 
           </div> 
       </form>
           
        </div>
      </div>
    </div>
  </div>

<include file="public:footer" />
<script>
layui.use(['form' , 'laydate','jquery','upload'], function(){  
  var form = layui.form , laydate = layui.laydate , $ = layui.jquery , upload = layui.upload;
 
  // 提交
  form.on('submit(upbtn)', function (data) {
      // 提交到方法 默认为本身
      $.post("{:U('ucenter/setpassword')}",data.field,function(res){
           if(res.status ==  1){
              layer.msg(res.msg,{time:1800},function(){
               
              });
          }else{
              layer.msg(res.msg,{time:1800});
              
          }
      });
      return false;
   });

  form.render();
});
 
</script>
<script>
  layui.cache.page = 'user';
  layui.config({
  base: '__PUBLIC__/theme/blueideal/mods/' //这里实际使用时，建议改成绝对路径
  }).extend({
    fly: 'index'
  }).use('fly');
</script>